<template>
  <div class="right-teach">
    <div class="df">
      <div class="bar"></div>
      <div class="bar-title">
        <div class="font-weight800 f20">咨询师推荐</div>
        <div class="f14 curr more" @click="handleMore">更多</div>
      </div>
    </div>
    <div class="teach-team curr">
      <div v-for="item in expertsTeamList" :key="item.id" class="team-item">
        <div class="left-head">
          <img
            style="width: 50px; height: 50px; border-radius: 50%"
            :src="item.picUrl"
            alt=""
          />
        </div>
        <div style="margin-left: 20px; flex: 1" @click="handleMore">
          <div class="right-brief">
            <div class="name" style="font-weight: bold; flex: 1">
              {{ item.name }}
            </div>
            <div class="year f12" style="margin-right: 6px">
              从业{{ item.expierences }}年
            </div>
            <div class="stars">
              <el-rate
                disabled
                v-model="item.stars"
                style="margin-bottom: 3px"
              />
            </div>
          </div>
          <div class="f12">
            <el-tag
              style="margin-right: 10px"
              size="small"
              v-for="tag in JSON.parse(item.specialty)"
              :key="tag"
              >{{ tag }}</el-tag
            >
          </div>
        </div>
      </div>
      <div style="text-align: center" v-if="expertsTeamList.length <= 0">
        暂无数据
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const { expertsTeamList } = defineProps({
  expertsTeamList: {
    type: Array,
    default: () => [],
  },
});
const handleMore = () => {
  router.push('/experts');
};
</script>

<style lang="scss" scoped>
.right-teach {
  width: 300px;
  margin-left: 60px;

  .bar {
    height: 24px;
    border-left: 4px solid var(--color-text);
    padding-left: 10px;
  }
  .bar-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .more {
      color: var(--color-text);
    }
  }
  .teach-team {
    .team-item {
      display: flex;
      align-items: center;
      margin: 20px 0 10px 0;
    }
    .right-brief {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  }
}
</style>
